package com.sofwin.service;

import com.sofwin.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @packageName: com.sofwin.service
 * @author: andyliu
 * @date: 2022/5/20 10:11
 * @email 115176513@qq.com
 * @description: TODO
 */
// 声明该接口是一个声明式服务的调用接口
@FeignClient("provider01")
public interface UserService {
    // 方法返回结果和远程服务的返回结果类型一致
    // 输入参数也一致
    // resfull风格的请求接口中也要声明路径变量
    @GetMapping("/user/info/{userId}")
    String userInfo(@PathVariable(value ="userId" ) Integer userId);
    @GetMapping("/user/a")
    User sdfsdf(@RequestParam(value = "id") Integer id,@RequestParam(value = "userName")String userName);
}
